package com.future.bantang.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.future.bantang.R;

/**
 * Created by zzh on 2016/1/14.
 */
public class SearchView extends LinearLayout{
    public SearchView(Context context) {
        super(context);
        inintView(context, null, 0);
    }

    public SearchView(Context context, AttributeSet attrs) {
        super(context, attrs);
        inintView(context, attrs, 0);
    }

    public SearchView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        inintView(context, attrs, defStyleAttr);
    }

    private void inintView(Context context, AttributeSet attrs, int defStyleAttr) {
        //加载布局
        View view = inflate(context, R.layout.search_view_layout, this);
        //获取子控件
        EditText editSearchview = (EditText) view.findViewById(R.id.edit_searchview);
        //解析attrs
        //获取属性
        //将属性设置到子控件上
        //将属性值设置到控件上
    }


    public String getText(){
        return null;
    }
}
